home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
jikes
/
src
/
error.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-05-14
|
31KB
|
594 lines
// $Id: error.h,v 1.12 1999/03/09 14:37:16 shields Exp $
//
// This software is subject to the terms of the IBM Jikes Compiler
// License Agreement available at the following URL:
// http://www.ibm.com/research/jikes.
// Copyright (C) 1996, 1998, International Business Machines Corporation
// and others. All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
#ifndef error_INCLUDED
#define error_INCLUDED
#include "config.h"
#include "stream.h"
#include "tuple.h"
class Control;
class LexStream;
class Ast_CompilationUnit;
class SymbolSet;
class Semantic;
class SemanticError
{
public:
enum SemanticErrorKind
{
BAD_ERROR,
DEFAULT_ERROR,
INVALID_OPTION,
INVALID_K_OPTION,
INVALID_K_TARGET,
INVALID_TAB_VALUE,
INVALID_DIRECTORY,
UNSUPPORTED_OPTION,
NO_CURRENT_DIRECTORY,
CANNOT_OPEN_ZIP_FILE,
PACKAGE_NOT_FOUND,
CANNOT_OPEN_DIRECTORY,
BAD_INPUT_FILE,
UNREADABLE_INPUT_FILE,
CANNOT_REOPEN_FILE,
CANNOT_WRITE_FILE,
CANNOT_COMPUTE_COLUMNS,
EMPTY_DECLARATION,
REDUNDANT_ABSTRACT,
REDUNDANT_FINAL,
REDUNDANT_PUBLIC,
REDUNDANT_STATIC,
OBSOLESCENT_ABSTRACT,
OBSOLESCENT_BRACKETS,
NO_TYPES,
MULTIPLE_PUBLIC_TYPES,
TYPE_IN_MULTIPLE_FILES,
PACKAGE_TYPE_CONFLICT,
DIRECTORY_FILE_CONFLICT,
FILE_FILE_CONFLICT,
MISMATCHED_TYPE_AND_FILE_NAMES,
REFERENCE_TO_TYPE_IN_MISMATCHED_FILE,
DUPLICATE_INNER_TYPE_NAME,
DUPLICATE_TYPE_DECLARATION,
DUPLICATE_ACCESS_MODIFIER,
DUPLICATE_MODIFIER,
FINAL_ABSTRACT_CLASS,
VOLATILE_FINAL,
FINAL_VOLATILE,
INVALID_TOP_LEVEL_CLASS_MODIFIER,
INVALID_INNER_CLASS_MODIFIER,
INVALID_STATIC_INNER_CLASS_MODIFIER,
INVALID_LOCAL_CLASS_MODIFIER,
INVALID_INTERFACE_MODIFIER,
INVALID_FIELD_MODIFIER,
INVALID_LOCAL_MODIFIER,
INVALID_METHOD_MODIFIER,
INVALID_SIGNATURE_MODIFIER,
INVALID_CONSTRUCTOR_MODIFIER,
INVALID_CONSTANT_MODIFIER,
UNINITIALIZED_FIELD,
PARENT_TYPE_IN_UNNAMED_PACKAGE,
RECOMPILATION,
TYPE_NOT_FOUND,
DUPLICATE_ON_DEMAND_IMPORT,
NOT_A_TYPE,
NOT_A_CLASS,
NOT_AN_INTERFACE,
SUPER_IS_FINAL,
OBJECT_WITH_SUPER_TYPE,
OBJECT_HAS_NO_SUPER_TYPE,
DUPLICATE_FIELD,
DUPLICATE_METHOD,
DUPLICATE_CONSTRUCTOR,
MISMATCHED_INHERITED_METHOD,
MISMATCHED_INHERITED_METHOD_EXTERNALLY,
DUPLICATE_FORMAL_PARAMETER,
MISMATCHED_CONSTRUCTOR_NAME,
METHOD_WITH_CONSTRUCTOR_NAME,
DUPLICATE_LOCAL_VARIABLE_DECLARATION,
DUPLICATE_LOCAL_TYPE_DECLARATION,
MULTIPLE_DEFAULT_LABEL,
UNDECLARED_LABEL,
DUPLICATE_LABEL,
CATCH_PRIMITIVE_TYPE,
CATCH_ARRAY_TYPE,
AMBIGUOUS_NAME,
FIELD_IS_TYPE,
FIELD_NOT_FOUND,
FIELD_NAME_MISSPELLED,
FIELD_WITH_PRIVATE_ACCESS_NOT_ACCESSIBLE,
FIELD_WITH_DEFAULT_ACCESS_NOT_ACCESSIBLE,
NAME_NOT_FOUND,
METHOD_NOT_FIELD,
NAME_NOT_YET_AVAILABLE,
NAME_NOT_VARIABLE,
NAME_NOT_CLASS_VARIABLE,
NOT_A_NUMERIC_VARIABLE,
METHOD_NOT_FOUND,
METHOD_NAME_NOT_FOUND_IN_TYPE,
METHOD_NAME_MISSPELLED,
METHOD_WITH_PRIVATE_ACCESS_NOT_ACCESSIBLE,
METHOD_WITH_DEFAULT_ACCESS_NOT_ACCESSIBLE,
HIDDEN_METHOD_IN_ENCLOSING_CLASS,
FIELD_NOT_METHOD,
TYPE_NOT_METHOD,
TYPE_NOT_FIELD,
METHOD_NOT_CLASS_METHOD,
AMBIGUOUS_CONSTRUCTOR_INVOCATION,
AMBIGUOUS_METHOD_INVOCATION,
CONSTRUCTOR_NOT_FOUND,
METHOD_FOUND_FOR_CONSTRUCTOR,
ABSTRACT_TYPE_CREATION,
INVALID_INSTANCEOF_CONVERSION,
INVALID_CAST_CONVERSION,
INVALID_CAST_TYPE,
INCOMPATIBLE_TYPE_FOR_INITIALIZATION,
INCOMPATIBLE_TYPE_FOR_ASSIGNMENT,
INCOMPATIBLE_TYPE_FOR_BINARY_EXPRESSION,
INCOMPATIBLE_TYPE_FOR_CONDITIONAL_EXPRESSION,
VOID_ARRAY,
VOID_TYPE_IN_EQUALITY_EXPRESSION,
TYPE_NOT_THROWABLE,
TYPE_NOT_PRIMITIVE,
TYPE_NOT_INTEGRAL,
TYPE_NOT_NUMERIC,
TYPE_NOT_INTEGER,
TYPE_NOT_BOOLEAN,
TYPE_NOT_ARRAY,
TYPE_NOT_REFERENCE,
TYPE_NOT_VALID_FOR_SWITCH,
TYPE_IS_VOID,
VALUE_NOT_REPRESENTABLE_IN_TYPE,
DUPLICATE_CASE_VALUE,
MISPLACED_THIS_EXPRESSION,
MISPLACED_SUPER_EXPRESSION,
TARGET_VARIABLE_IS_FINAL,
FINAL_VARIABLE_TARGET_IN_LOOP,
UNINITIALIZED_FINAL_VARIABLE,
UNINITIALIZED_STATIC_FINAL_VARIABLE,
UNINITIALIZED_FINAL_VARIABLE_IN_CONSTRUCTOR,
INIT_SCALAR_WITH_ARRAY,
INIT_ARRAY_WITH_SCALAR,
INVALID_BYTE_VALUE,
INVALID_SHORT_VALUE,
INVALID_CHARACTER_VALUE,
INVALID_INT_VALUE,
INVALID_LONG_VALUE,
INVALID_FLOAT_VALUE,
INVALID_DOUBLE_VALUE,
INVALID_STRING_VALUE,
RETURN_STATEMENT_IN_INITIALIZER,
MISPLACED_RETURN_WITH_EXPRESSION,
MISPLACED_RETURN_WITH_NO_EXPRESSION,
MISMATCHED_RETURN_AND_METHOD_TYPE,
EXPRESSION_NOT_THROWABLE,
BAD_THROWABLE_EXPRESSION_IN_TRY,
BAD_THROWABLE_EXPRESSION_IN_METHOD,
BAD_THROWABLE_EXPRESSION,
MISPLACED_BREAK_STATEMENT,
MISPLACED_CONTINUE_STATEMENT,
MISPLACED_EXPLICIT_CONSTRUCTOR_INVOCATION,
INVALID_CONTINUE_TARGET,
NON_ABSTRACT_TYPE_CONTAINS_ABSTRACT_METHOD,
NON_ABSTRACT_TYPE_INHERITS_ABSTRACT_METHOD,
NON_ABSTRACT_TYPE_INHERITS_ABSTRACT_METHOD_FROM_ABSTRACT_CLASS,
NON_ABSTRACT_TYPE_CANNOT_OVERRIDE_DEFAULT_ABSTRACT_METHOD,
NO_ABSTRACT_METHOD_IMPLEMENTATION,
DUPLICATE_INTERFACE,
UNKNOWN_QUALIFIED_NAME_BASE,
UNKNOWN_AMBIGUOUS_NAME,
CIRCULAR_INTERFACE,
CIRCULAR_CLASS,
TYPE_NOT_ACCESSIBLE,
PRIVATE_FIELD_NOT_ACCESSIBLE,
PROTECTED_FIELD_NOT_ACCESSIBLE,
DEFAULT_FIELD_NOT_ACCESSIBLE,
PRIVATE_METHOD_NOT_ACCESSIBLE,
PROTECTED_METHOD_NOT_ACCESSIBLE,
DEFAULT_METHOD_NOT_ACCESSIBLE,
PRIVATE_CONSTRUCTOR_NOT_ACCESSIBLE,
PROTECTED_CONSTRUCTOR_NOT_ACCESSIBLE,
DEFAULT_CONSTRUCTOR_NOT_ACCESSIBLE,
CONSTRUCTOR_DOES_NOT_THROW_THIS_EXCEPTION,
CONSTRUCTOR_DOES_NOT_THROW_SUPER_EXCEPTION,
PARAMETER_REDECLARED,
BAD_ABSTRACT_METHOD_MODIFIER,
ABSTRACT_METHOD_MODIFIER_CONFLICT,
ABSTRACT_METHOD_INVOCATION,
FINAL_METHOD_OVERRIDE,
FINAL_METHOD_OVERRIDE_EXTERNALLY,
PRIVATE_METHOD_OVERRIDE,
PRIVATE_METHOD_OVERRIDE_EXTERNALLY,
INSTANCE_METHOD_OVERRIDE,
INSTANCE_METHOD_OVERRIDE_EXTERNALLY,
CLASS_METHOD_OVERRIDE,
CLASS_METHOD_OVERRIDE_EXTERNALLY,
MISMATCHED_OVERRIDDEN_EXCEPTION,
MISMATCHED_OVERRIDDEN_EXCEPTION_EXTERNALLY,
ABSTRACT_METHOD_WITH_BODY,
NON_ABSTRACT_METHOD_WITHOUT_BODY,
BAD_ACCESS_METHOD_OVERRIDE,
BAD_ACCESS_METHOD_OVERRIDE_EXTERNALLY,
STATIC_OVERRIDE_ABSTRACT,
STATIC_OVERRIDE_ABSTRACT_EXTERNALLY,
CIRCULAR_THIS_CALL,
INSTANCE_VARIABLE_IN_EXPLICIT_CONSTRUCTOR_INVOCATION,
INSTANCE_METHOD_IN_EXPLICIT_CONSTRUCTOR_INVOCATION,
SYNTHETIC_VARIABLE_ACCESS,
SYNTHETIC_METHOD_INVOCATION,
THIS_IN_EXPLICIT_CONSTRUCTOR_INVOCATION,
SUPER_IN_EXPLICIT_CONSTRUCTOR_INVOCATION,
EXPRESSION_NOT_CONSTANT,
UNCATCHABLE_METHOD_THROWN_CHECKED_EXCEPTION,
UNCATCHABLE_CONSTRUCTOR_THROWN_CHECKED_EXCEPTION,
UNREACHABLE_CATCH_CLAUSE,
UNREACHABLE_STATEMENT,
UNREACHABLE_STATEMENTS,
UNREACHABLE_CONSTRUCTOR_BODY,
BLOCKED_CATCH_CLAUSE,
VARIABLE_NOT_DEFINITELY_ASSIGNED,
TYPED_METHOD_WITH_NO_RETURN,
DEFAULT_METHOD_NOT_OVERRIDDEN,
ONE_UNNAMED_PACKAGE,
TYPE_NOT_IN_UNNAMED_PA